package com.igeekhome.ccs.biz.impl;

import com.igeekhome.ccs.biz.IHaterBiz;
import com.igeekhome.ccs.entity.Customer;
import com.igeekhome.ccs.entity.Hater;
import com.igeekhome.ccs.mapper.HaterMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HaterBizImpl implements IHaterBiz {
    @Autowired
    private HaterMapper mapper;

    @Override
    public int createHater(Hater h) {
        mapper.create(h);
        return 0;
    }

    @Override
    public List<Customer> getAll() {
        return mapper.getAll();
    }

    @Override
    public List<Customer> queryByGrade(String grade) {
        return mapper.queryByGrade(grade);
    }

    @Override
    public List<Customer> queryBySource(String source) {
        return mapper.queryBySource(source);
    }

    @Override
    public List<Customer> queryByName(String name) {
        return mapper.queryByName(name);
    }

    @Override
    public List<Customer> queryByRealName(String realName) {
        return mapper.queryByRealName(realName);
    }

    @Override
    public List<Customer> queryByPhone(String phone) {
        return mapper.queryByPhone(phone);
    }

    @Override
    public List<Customer> queryByEmail(String email) {
        return mapper.queryByEmail(email);
    }

    @Override
    public int free(int id) {
        return mapper.free(id);
    }

    @Override
    public int freeBatch(List<Integer> ids) {
        return mapper.freeBatch(ids);
    }
}
